<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta content="initial-scale=1.0,user-scalable=no,maximum-scale=1,width=device-width" name="viewport" />
<meta content="yes" name="apple-mobile-web-app-capable" />
<meta content="black" name="apple-mobile-web-app-status-bar-style" />
<meta content="telephone=no" name="format-detection" />
<title>无标题文档</title>
<script src="js/jquery.js"></script>
    <script src="/jquery-2.2.3.min.js"></script>
    <script src="../method.js"></script>
    <#include "public/app/mxcss.ftl">
</head>

<body>
<article class="hometop"><a href="javascript:history.back(-1);" class="left"><img src="../images/arrow-left.png"></a> <span>添加新银行卡</span> </article>
<article class="usercenter">
    <section class="two">        
    	<p>绑定您本人的银行卡：</p>
        <section class="userlist">
            <ul>
                <li>
                	<a href="/bindcard/bindnewcardchoose">
                    <ul>
                        <li class="fl"> <span>选择银行</span>
                            <span>
                            <#if Session.bankName??>
                                ${Session.bankName?if_exists}
                            </#if>
                            </span></li>
                        <li class="fr"><span><i class="fa fa-angle-right f24 fgray">

                                </i></span></li>
                    </ul>
                    </a>
				</li>
                <li>
                    <ul>
                        <li class="fl"> <span>银行卡号</span> </li>
                        <li class="fl"> <span><input type="text" id="cardCode" placeholder="请输入您的银行卡卡号"></span></li>
                    </ul>
				</li>
            </ul>
        </section>
        <aside class="ml22 mr22 mb22 mt22"> <a href="javascript:addCardCode()" class="btn btn-orange">下一步</a> </aside>
    </section>
</article>

<script>
    function addCardCode(){
        var cardCode = $("#cardCode").val();
        alert(cardCode);
        if(cardCode == ""){
            alert("银行卡号不能为空");
            return ;
        }
        var data = {cardCode:cardCode};
        var url = "/bindcard/addcardcode";
        postReq(url,data,function(result){
            if(result.success){
                alert("设置成功");
                location.href="/bindcard/bindnewcardtwo";
            }else{
                alert(result.msg)
            }
        });
    }
</script>
</body>
</html>